package cn.school.test.Student;

import cn.school.dao.StudentMapper;
import cn.school.entity.Student;
import cn.school.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Date;
import java.util.List;

public class StudentLimitTest {
    public static void main(String[] args) {
        /*SqlSession session= MybatisUtil.get();
        StudentMapper mapper = session.getMapper(StudentMapper.class);
       List<Student> list=mapper.search("王",3,4);
        list.forEach(System.out::println);
        MybatisUtil.close(session);
        System.out.println(find1(2, 4));*/
        SqlSession s = MybatisUtil.get();
        StudentMapper mapper = s.getMapper(StudentMapper.class);
        List<Student> students = mapper.search(3,1,"李","123","15", "138",null,null);
        System.out.println(students);
        MybatisUtil.close(s);
    }

    /*public static List<Student> find1(int pageNo, int pageSize) {
        SqlSession s = MybatisUtil.get();
        StudentMapper mapper = s.getMapper(StudentMapper.class);
        List<Student> students = mapper.search(3,1,"李","123","15", "138",null,null);
        MybatisUtil.close(s);
       return students;
    }*/
}
